# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=perl-geography-countries
_pkgname=Geography-Countries
pkgver=2009041301
pkgrel=11
pkgdesc='2-letter, 3-letter, and numerical codes for countries.'
arch=('any')
url='http://search.cpan.org/~ABIGAIL/Geography-Countries'
license=('GPL' 'PerlArtistic')
depends=('perl>=5.10.0')
options=('!emptydirs')
source=("http://www.cpan.org/authors/id/A/AB/ABIGAIL/$_pkgname-$pkgver.tar.gz")
sha512sums=('4197edced04c7330dfd8ba7fbf137c3b6e47fe6402b3f90bacbfddf790dc38420c500846fd1abf0a4b99a2558d651086f3daffb0e52df9b679f5aacd9a1a203d')

prepare() {
  cd "$pkgname-$pkgver"

  sed -i '/^auto_install/d' Makefile.PL
}

build() {
  cd "$_pkgname-$pkgver"

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor

  make
}

package() {
  cd "$_pkgname-$pkgver"

  make install DESTDIR="$pkgdir"

  find $pkgdir -name '.packlist' -delete
  find $pkgdir -name '*.pod' -delete
}

